
<%-- 
    Document   : ny_simulering
    Created on : 27.apr.2012, 13:27:14
    Author     : 500134
--%>
<%@include file="WEB-INF/jspf/header.jspf"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
    ArrayList<String> fylker;
    ArrayList<String> bygninger;
    ArrayList<String> beboere;

    bygninger = db.DatabaseKobling.getUserStructures(request.getSession().getAttribute("username").toString());
    fylker = db.DatabaseKobling.getFylker();
    beboere = db.DatabaseKobling.getInhabitants();
%>

<script src="jquery/highcharts.js" type="text/javascript"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<script type="text/javascript" src="HandleSimulation.js"></script>

<body>
    <div id="chart" action="Submit" style="width: 100%; height: 400px">
    </div>
    <h2>Ny simulering</h2>
    <div class="ny_simulering_area">
        <div class="ny_simulering_box">
            <form name="Submit"  onSubmit="return false;">&nbsp;
                Velg profil: <select id="profil" name="profil">
                    <% for (int i = 0; i < bygninger.size(); i++) {
                            out.print("<option>" + bygninger.get(i) + "</option>");
                        }%>
                </select>
                <input type="button" value="Lag ny profil" onclick="location.href = 'ny_bygning.jsp'" /><br/><br/>

                Velg beboere: <select id="beboere" name="beboere">
                    <% for (int i = 0; i < beboere.size(); i++) {
                            out.print("<option>" + beboere.get(i) + "</option>");
                        }%>
                </select><br/><br/>
                <script>
                $(function() {
                    $("#datepicker_start").datepicker({ dateFormat: "yy-mm-dd"});
                    $("#datepicker_stop").datepicker({ dateFormat: "yy-mm-dd"});
                });
                </script>

                <p>Start date: <input type="text" name="startdate" id="datepicker_start" required/></p>
                <p>Stop date: <input type="text" name="enddate" id="datepicker_stop" required/></p>
                
                <p>Temperatur varmtvannstank <input type="number" name="watertemp" value="70" min="0" id="water_temp"/></p
                <p>Vannforbruk per døgn per person<input type="number" name="waterusage" value="100" min="0" id="water_usage"/></p>
                <p>Antall personer i bygning<input type="number" name="personcount" value="5" min="0" id="person_count"/></p>
                
                <p>Høyde på vegger<input type="number" name="hoyde" min="0" id="vegg_hoyde"/></p>
                <p>Lengde på vegger<input type="number" name="bredde" min="0" id="vegg_bredde"/></p>
                <p>uVerdi til vegger<input type="number" step="any" name="uverdi" min="0" id="uverdi"/></p>

                <br/><br/>
                <!--Real time: <input type="checkbox" name="realtime" value="realtime"/><br/><br/>-->
                <!--
            Fylke:<select name="fylke" id="fylke">
                <% for (int i = 0; i < fylker.size(); i++) {
                        out.print("<option>" + fylker.get(i) + "</option>");
                    }%>
            </select>
            <div id="kommune"></div>
                -->
                <script type="text/javascript" src="locationpicker.js"></script>
                <label for="idSlctFylker">Velg fylke: </label>
                <select id="idSlctFylker"></select>
                <br/>
                <label for="idSlctKommuner">Velg kommune: </label>
                <select id="idSlctKommuner"></select>
                <br />
                <label for="idSlctWeatherStations">Velg naermeste stasjon: </label><br/>
                <select id="idSlctWeatherStations"></select>
                <br/><br/>
                Tidsfrekvens:<select id="tid" name="tidsfrekvens">
                    <option>Sekund</option>
                    <option>Minutt</option>
                    <option>Time</option>
                    <option>Dag</option>
                    <option>Måned</option>
                    <option>År</option>
                </select><br/><br/>
                <button id="submit" > Simuler </button>
            </form>
        </div>
    </div>
    <div id="dialog-modal" title="try to get stations">

    </div>
</body>
</html>
<%@include file="profile.jsp"%>
<%@include file="temp.jsp" %>
<%@include file="WEB-INF/jspf/footer.jspf"%>
